package one.stand.controller;

import one.stand.model.ResultModel;
import one.stand.request.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Administrator
 */
@RestController
@RequestMapping("dataCount")
public class DataCountController extends BaseController {

    /**
     * 个人数据统计/企业数据统计
     *
     * @return
     */
    @PostMapping("personalData")
    public ResultModel personalData(@RequestBody FinanceRequest request) {
        return dataCountService.personalData(request);
    }

    /**
     * 近7日成交额
     *
     * @return
     */
    @PostMapping("sevenData")
    public ResultModel sevenData(@RequestBody FinanceRequest request) {
        return dataCountService.sevenData(request);
    }

    /**
     * 数据汇总
     *
     * @return
     */
    @PostMapping("dataSummary")
    public ResultModel dataSummary(@RequestBody FinanceRequest request) {
        return dataCountService.dataSummary(request);
    }

    /**
     * 成交率漏斗
     *
     * @return
     */
    @PostMapping("turnoverRate")
    public ResultModel turnoverRate(@RequestBody FinanceRequest request) {
        return dataCountService.turnoverRate(request);
    }

    /**
     * 新增客户数
     *
     * @return
     */
    @PostMapping("newCustomerNum")
    public ResultModel newCustomerNum(@RequestBody FinanceRequest request) {
        return dataCountService.newCustomerNum(request);
    }

    /**
     * 咨询客户数
     *
     * @return
     */
    @PostMapping("followCustomerNum")
    public ResultModel followCustomerNum(@RequestBody FinanceRequest request) {
        return dataCountService.followCustomerNum(request);
    }

    /**
     * 跟进客户数
     *
     * @return
     */
    @PostMapping("consultationNum")
    public ResultModel consultationNum(@RequestBody FinanceRequest request) {
        return dataCountService.consultationNum(request);
    }

    /**
     * 近15日客户活跃数
     *
     * @return
     */
    @PostMapping("activeCustomerNum")
    public ResultModel activeCustomerNum(@RequestBody FinanceRequest request) {
        return dataCountService.activeCustomerNum(request);
    }
}
